<template>
    <view class="nodata">
        <image :src="baseImg" class="empty_image" model="aspectFit"></image>
        <text :style="{color:textColor}">{{ text }}</text>
    </view>
</template>

<script>
    export default {
        name: 'xw-empty',
        props: {
            //text
            text: {
                type: String,
                default: '暂无数据'
            },
            img: {
                type: String,
                default: '/static/images/other/nodata.png'
            },
            textColor:{
                type: String,
                default: '#999999'
            },
        },
        data() {
            return {
                baseImg:
                    ''
            };
        },
        methods: {}
    };
</script>

<style lang="scss">
    .nodata {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 280rpx;
        width: 100%;
        align-items: center;
        color: #555555;
        font-size: 24rpx;
    }
    .empty_image {
        width: 200rpx !important;
        margin-bottom: 50rpx;
    }
</style>

